﻿@model Entidades.ENContrato
@using EncomiendaMVC.Helpers

@{
    ViewBag.Title = "Editar";
}

<!-- JQUERY UI -->
<link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.24.min.js")"></script>
<script src="@Url.Content("~/Scripts/base/modHtml5.js")"></script>

<script src="@Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>

@Html.Titulo("Editar")

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Cliente_ID)
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.Cliente_ID)*@
           @Html.DropDownListFor(model => model.Cliente_ID,(SelectList)(ViewBag.ListaCliente))
            @Html.ValidationMessageFor(model => model.Cliente_ID)
        </div>      

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaSalida)
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.FechaSalida)*@
            @Html.TextBox("FechaSalida",null, new { type = "date", @class="fecha" })
            @Html.ValidationMessageFor(model => model.FechaSalida)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaLlegada)
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.FechaLlegada)*@
             @Html.TextBox("FechaLlegada",null, new { type = "date", @class="fecha" })
            @Html.ValidationMessageFor(model => model.FechaLlegada)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Ruta)
        </div>
        <div class="editor-field">
              @Html.DropDownListFor(model => model.Ruta,(SelectList)(ViewBag.Ruta))                 
            @Html.ValidationMessageFor(model => model.Ruta)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Aerolinea)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Aerolinea,(SelectList)(ViewBag.Aerolinea))           
            @Html.ValidationMessageFor(model => model.Aerolinea)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Vuelo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Vuelo)
            @Html.ValidationMessageFor(model => model.Vuelo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.NumeroMaletas)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumeroMaletas)
            @Html.ValidationMessageFor(model => model.NumeroMaletas)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Precio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Precio)
            @Html.ValidationMessageFor(model => model.Precio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Total_cnt)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Total_cnt)
            @Html.ValidationMessageFor(model => model.Total_cnt)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Peso)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Peso)
            @Html.ValidationMessageFor(model => model.Peso)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TipoEntrega)
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.TipoEntrega)*@
            @Html.DropDownListFor(model => model.TipoEntrega,(SelectList)(ViewBag.TipoEntrega))     
            @Html.ValidationMessageFor(model => model.TipoEntrega)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gastos)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Gastos)
            @Html.ValidationMessageFor(model => model.Gastos)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Observacion)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Observacion)
            @Html.ValidationMessageFor(model => model.Observacion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Descripcion)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descripcion)
            @Html.ValidationMessageFor(model => model.Descripcion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DatosMaleta)
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.DatosMaleta)*@
            @Html.DropDownListFor(model => model.DatosMaleta,(SelectList)(ViewBag.DatoMaletas))
            @Html.ValidationMessageFor(model => model.DatosMaleta)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Estado)
        </div>
        <div class="editor-field">
            @*@Html.DropDownListFor(model => model.Estado, (SelectList)ViewBag.Estado, ":::Seleccione:::")*@
            @Html.DropDownListFor(model => model.Cod_Estado,(SelectList)(ViewBag.Estado))
            @Html.ValidationMessageFor(model => model.Cod_Estado)

        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
